<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class CreateLinkagesTable
 * 中国省市区(县)三级联动
 */
class CreateLinkagesTable extends Migration
{

    /**
     * 执行迁移
     */
    public function up()
    {
        Schema::create('linkages', function(Blueprint $table)
        {
            $table->unsignedInteger('id');
            $table->unsignedInteger('sup_id');
            $table->string('name', 50);
            $table->unsignedInteger('type');
        });
    }


    /**
     * 迁移回滚
     */
    public function down()
    {
        Schema::drop('linkages');
    }

}
